package com.atguigu.webadmin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atguigu.model.pojo.DistrictInfo;
import com.atguigu.webadmin.service.DistrictInfoService;
import com.atguigu.webadmin.mapper.DistrictInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author 梅超凡
 * @Date 2024/11/12~20:25
 * @Description 针对表【district_info】的数据库操作Service实现
*/
@Service
public class DistrictInfoServiceImpl extends ServiceImpl<DistrictInfoMapper, DistrictInfo>
    implements DistrictInfoService{

    @Autowired
    private DistrictInfoMapper districtInfoMapper;
    @Override
    public String selectDistrictNameById(Long districtId) {
        DistrictInfo districtInfo = districtInfoMapper.selectById(districtId);
        return districtInfo.getName();
    }
}




